package com.yurendao.shop.user.service;

import com.yurendao.shop.user.domain.User;
import com.yurendao.shop.user.service.exception.UserException;

/**
 * Created by kong on 15/9/30.
 * 用户模块业务层接口
 */
public interface UserService {

    /**
     * 添加用户
     * @param user
     * @throws UserException
     */
    public void insertUser(User user) throws UserException;

    /**
     * ajax验证用户名
     * @param uname
     * @throws UserException
     */
    public void ajaxUname(String uname) throws UserException;

    /**
     * 登录
     * @param user
     * @return
     * @throws UserException
     */
    public User login(User user) throws UserException;

    /**
     * 手机号注册
     * @param telephone
     * @throws UserException
     */
    public void telephoneRegist(String telephone) throws UserException;

    /**
     * 修改个人信息
     * @param userDetail
     * @throws UserException
     */
    public void modifyDetail(User userDetail) throws UserException;

    public String getNameByID(String uid) throws UserException;
}
